package com.vueblog.webapi.controller;


import com.vueblog.webapi.request.GetBlogInfoPageRequest;
import com.vueblog.webapi.response.BasePageResponse;
import com.vueblog.webapi.response.BaseResponse;
import com.vueblog.webapi.service.IBlogService;
import com.vueblog.webapi.service.ITypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author luosj
 * @since 2021-05-15
 */
@Controller
@CrossOrigin
@RequestMapping("/show/types")
public class ShowTypeController extends BaseController {

    @Autowired
    private ITypeService typeService;

    /**
     * 获取分类对应博客数量列表
     */
    @GetMapping("/blogCount")
    @ResponseBody
    public BaseResponse getTypeBlogCountList() {
        return typeService.getTypeBlogCountList();
    }
}
